package com.bifrost.cbentity;

import javax.persistence.*;

/**
 * @author rangf
 * @date 2018/2/27
 */
@Entity
@Table(name = "BHWSC_MDSP")
public class SapStoreProduct {
    private String matnr;
    private String locnr;
    private String prwog;
    private String prwug;
    private String dismm;
    private String sernp;
    private String consProcg;
    private String mmsta;
    private String mtvfp;
    private String prerf;
    private String rbzul;
    private String kwdht;
    private String lifnrZy;
    private String scagr;
    private String zztjj;
    private String zzsfcs;
    private String alBomMatnr;
    private String alBomQuant;
    private String alBomUnit;
    private String dstatus;
    private String ddate;
    private Long noid;

    @Basic
    @Column(name = "MATNR", nullable = true, length = 18)
    public String getMatnr() {
        return matnr;
    }

    public void setMatnr(String matnr) {
        this.matnr = matnr;
    }

    @Basic
    @Column(name = "LOCNR", nullable = true, length = 10)
    public String getLocnr() {
        return locnr;
    }

    public void setLocnr(String locnr) {
        this.locnr = locnr;
    }

    @Basic
    @Column(name = "PRWOG", nullable = true, length = 18)
    public String getPrwog() {
        return prwog;
    }

    public void setPrwog(String prwog) {
        this.prwog = prwog;
    }

    @Basic
    @Column(name = "PRWUG", nullable = true, length = 18)
    public String getPrwug() {
        return prwug;
    }

    public void setPrwug(String prwug) {
        this.prwug = prwug;
    }

    @Basic
    @Column(name = "DISMM", nullable = true, length = 2)
    public String getDismm() {
        return dismm;
    }

    public void setDismm(String dismm) {
        this.dismm = dismm;
    }

    @Basic
    @Column(name = "SERNP", nullable = true, length = 4)
    public String getSernp() {
        return sernp;
    }

    public void setSernp(String sernp) {
        this.sernp = sernp;
    }

    @Basic
    @Column(name = "CONS_PROCG", nullable = true, length = 1)
    public String getConsProcg() {
        return consProcg;
    }

    public void setConsProcg(String consProcg) {
        this.consProcg = consProcg;
    }

    @Basic
    @Column(name = "MMSTA", nullable = true, length = 2)
    public String getMmsta() {
        return mmsta;
    }

    public void setMmsta(String mmsta) {
        this.mmsta = mmsta;
    }

    @Basic
    @Column(name = "MTVFP", nullable = true, length = 2)
    public String getMtvfp() {
        return mtvfp;
    }

    public void setMtvfp(String mtvfp) {
        this.mtvfp = mtvfp;
    }

    @Basic
    @Column(name = "PRERF", nullable = true, length = 1)
    public String getPrerf() {
        return prerf;
    }

    public void setPrerf(String prerf) {
        this.prerf = prerf;
    }

    @Basic
    @Column(name = "RBZUL", nullable = true, length = 1)
    public String getRbzul() {
        return rbzul;
    }

    public void setRbzul(String rbzul) {
        this.rbzul = rbzul;
    }

    @Basic
    @Column(name = "KWDHT", nullable = true, length = 1)
    public String getKwdht() {
        return kwdht;
    }

    public void setKwdht(String kwdht) {
        this.kwdht = kwdht;
    }

    @Basic
    @Column(name = "LIFNR_ZY", nullable = true, length = 1)
    public String getLifnrZy() {
        return lifnrZy;
    }

    public void setLifnrZy(String lifnrZy) {
        this.lifnrZy = lifnrZy;
    }

    @Basic
    @Column(name = "SCAGR", nullable = true, length = 4)
    public String getScagr() {
        return scagr;
    }

    public void setScagr(String scagr) {
        this.scagr = scagr;
    }

    @Basic
    @Column(name = "ZZTJJ", nullable = true, length = 1)
    public String getZztjj() {
        return zztjj;
    }

    public void setZztjj(String zztjj) {
        this.zztjj = zztjj;
    }

    @Basic
    @Column(name = "ZZSFCS", nullable = true, length = 1)
    public String getZzsfcs() {
        return zzsfcs;
    }

    public void setZzsfcs(String zzsfcs) {
        this.zzsfcs = zzsfcs;
    }

    @Basic
    @Column(name = "AL_BOM_MATNR", nullable = true, length = 18)
    public String getAlBomMatnr() {
        return alBomMatnr;
    }

    public void setAlBomMatnr(String alBomMatnr) {
        this.alBomMatnr = alBomMatnr;
    }

    @Basic
    @Column(name = "AL_BOM_QUANT", nullable = true, length = 18)
    public String getAlBomQuant() {
        return alBomQuant;
    }

    public void setAlBomQuant(String alBomQuant) {
        this.alBomQuant = alBomQuant;
    }

    @Basic
    @Column(name = "AL_BOM_UNIT", nullable = true, length = 3)
    public String getAlBomUnit() {
        return alBomUnit;
    }

    public void setAlBomUnit(String alBomUnit) {
        this.alBomUnit = alBomUnit;
    }

    @Basic
    @Column(name = "DSTATUS", nullable = true, length = 1)
    public String getDstatus() {
        return dstatus;
    }

    public void setDstatus(String dstatus) {
        this.dstatus = dstatus;
    }

    @Basic
    @Column(name = "DDATE", nullable = true, length = 14)
    public String getDdate() {
        return ddate;
    }

    public void setDdate(String ddate) {
        this.ddate = ddate;
    }

    @Id
    @SequenceGenerator(name= "sequence",sequenceName="sequence_store_product" ,allocationSize=1)
    @GeneratedValue(generator= "sequence",strategy= GenerationType.SEQUENCE)
    @Column(name = "NOID", nullable = false, precision = 0)
    public Long getNoid() {
        return noid;
    }

    public void setNoid(Long noid) {
        this.noid = noid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SapStoreProduct that = (SapStoreProduct) o;

        if (noid != that.noid) return false;
        if (matnr != null ? !matnr.equals(that.matnr) : that.matnr != null) return false;
        if (locnr != null ? !locnr.equals(that.locnr) : that.locnr != null) return false;
        if (prwog != null ? !prwog.equals(that.prwog) : that.prwog != null) return false;
        if (prwug != null ? !prwug.equals(that.prwug) : that.prwug != null) return false;
        if (dismm != null ? !dismm.equals(that.dismm) : that.dismm != null) return false;
        if (sernp != null ? !sernp.equals(that.sernp) : that.sernp != null) return false;
        if (consProcg != null ? !consProcg.equals(that.consProcg) : that.consProcg != null) return false;
        if (mmsta != null ? !mmsta.equals(that.mmsta) : that.mmsta != null) return false;
        if (mtvfp != null ? !mtvfp.equals(that.mtvfp) : that.mtvfp != null) return false;
        if (prerf != null ? !prerf.equals(that.prerf) : that.prerf != null) return false;
        if (rbzul != null ? !rbzul.equals(that.rbzul) : that.rbzul != null) return false;
        if (kwdht != null ? !kwdht.equals(that.kwdht) : that.kwdht != null) return false;
        if (lifnrZy != null ? !lifnrZy.equals(that.lifnrZy) : that.lifnrZy != null) return false;
        if (scagr != null ? !scagr.equals(that.scagr) : that.scagr != null) return false;
        if (zztjj != null ? !zztjj.equals(that.zztjj) : that.zztjj != null) return false;
        if (zzsfcs != null ? !zzsfcs.equals(that.zzsfcs) : that.zzsfcs != null) return false;
        if (alBomMatnr != null ? !alBomMatnr.equals(that.alBomMatnr) : that.alBomMatnr != null) return false;
        if (alBomQuant != null ? !alBomQuant.equals(that.alBomQuant) : that.alBomQuant != null) return false;
        if (alBomUnit != null ? !alBomUnit.equals(that.alBomUnit) : that.alBomUnit != null) return false;
        if (dstatus != null ? !dstatus.equals(that.dstatus) : that.dstatus != null) return false;
        if (ddate != null ? !ddate.equals(that.ddate) : that.ddate != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = matnr != null ? matnr.hashCode() : 0;
        result = 31 * result + (locnr != null ? locnr.hashCode() : 0);
        result = 31 * result + (prwog != null ? prwog.hashCode() : 0);
        result = 31 * result + (prwug != null ? prwug.hashCode() : 0);
        result = 31 * result + (dismm != null ? dismm.hashCode() : 0);
        result = 31 * result + (sernp != null ? sernp.hashCode() : 0);
        result = 31 * result + (consProcg != null ? consProcg.hashCode() : 0);
        result = 31 * result + (mmsta != null ? mmsta.hashCode() : 0);
        result = 31 * result + (mtvfp != null ? mtvfp.hashCode() : 0);
        result = 31 * result + (prerf != null ? prerf.hashCode() : 0);
        result = 31 * result + (rbzul != null ? rbzul.hashCode() : 0);
        result = 31 * result + (kwdht != null ? kwdht.hashCode() : 0);
        result = 31 * result + (lifnrZy != null ? lifnrZy.hashCode() : 0);
        result = 31 * result + (scagr != null ? scagr.hashCode() : 0);
        result = 31 * result + (zztjj != null ? zztjj.hashCode() : 0);
        result = 31 * result + (zzsfcs != null ? zzsfcs.hashCode() : 0);
        result = 31 * result + (alBomMatnr != null ? alBomMatnr.hashCode() : 0);
        result = 31 * result + (alBomQuant != null ? alBomQuant.hashCode() : 0);
        result = 31 * result + (alBomUnit != null ? alBomUnit.hashCode() : 0);
        result = 31 * result + (dstatus != null ? dstatus.hashCode() : 0);
        result = 31 * result + (ddate != null ? ddate.hashCode() : 0);
        result = 31 * result + (int) (noid ^ (noid >>> 32));
        return result;
    }
}
